import Layout from '@/layout'

const accountRouter = {
  path: '/account',
  component: Layout,
  redirect: '',
  name: 'Account',
  meta: {
    title: '账户管理',
    icon: '账户管理',
    noCache: false
  },
  children: [
    {
      path: 'merchantManagement',
      component: () => import('@/views/account/merchant/index'),
      name: 'MerchantManagement',
      meta: { title: '商户管理', icon: '商户管理' },
      children: [
        {
          path: 'merchantList',
          component: () => import('@/views/account/merchant/merchantList'),
          name: 'MerchantList',
          meta: { title: '商户管理', noCache: false }
        },
        {
          path: 'merchantEdit/:id',
          component: () => import('@/views/account/merchant/merchantEdit'),
          name: 'MerchantEdit',
          meta: { title: '商户编辑' },
          hidden: true
        },
        {
          path: 'merchantAdd',
          component: () => import('@/views/account/merchant/merchantAdd'),
          name: 'MerchantAdd',
          meta: { title: '新增商户' },
          hidden: true
        },
        {
          path: 'merchantCourseList/:id',
          component: () => import('@/views/account/merchant/merchantCourseList'),
          name: 'MerchantCourseList',
          meta: { title: '商户课程' },
          hidden: true
        },
        {
          path: 'merchantCourseEdit/:id',
          component: () => import('@/views/account/merchant/merchantCourseEdit'),
          name: 'MerchantCourseEdit',
          meta: { title: '编辑课程' },
          hidden: true
        }
      ]
    },
    {
      path: 'merchantVerifyManagement',
      component: () => import('@/views/account/merchant/index'),
      name: 'MerchantVerifyManagement',
      meta: { title: '商户认证审核', icon: '商户认证审核' },
      children: [
        {
          path: 'merchantVerifyList',
          component: () => import('@/views/account/merchant/merchantVerifyList'),
          name: 'MerchantVerifyList',
          meta: { title: '商户认证审核', noCache: true }
        },
        {
          path: 'merchantVerifyDetail/:id/:categoryNames/:serverPhone',
          component: () => import('@/views/account/merchant/merchantVerifyDetail'),
          name: 'MerchantVerifyDetail',
          meta: { title: '商户认证审核详情' },
          hidden: true
        }
      ]
    },
    {
      path: 'userList',
      component: () => import('@/views/account/user/userList'),
      name: 'UserList',
      meta: { title: '用户管理', noCache: true, icon: '用户管理' }
    },
    {
      path: 'membermanagement',
      // hidden: true,
      component: () => import('@/views/account/member/index'),
      name: 'MemberManagement',
      meta: { title: '会员管理', icon: '课程标签管理' },
      children: [
        {
          path: 'memberlist',
          component: () => import('@/views/account/member/memberManagement'),
          name: 'memberList',
          meta: { title: '会员管理', noCache: true }
        }
      ]
    }
  ]
}
export default accountRouter
